﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Hotel.NhanVien
{
    public partial class QuanLiTaiKhoan : Form
    {
        string tentaikhoan;
        public QuanLiTaiKhoan(string _tentaikhoan)
        {
            InitializeComponent();
            this.tentaikhoan = _tentaikhoan;
        }

        private void btnTaoTaiKhoan_Click(object sender, EventArgs e)
        {
            this.panelQuanLiTaiKhoan.Controls.Clear();
            TaiKhoan_Tao taoTaiKhoan = new TaiKhoan_Tao();
            taoTaiKhoan.TopLevel=false;
            taoTaiKhoan.FormBorderStyle = FormBorderStyle.None;
            this.panelQuanLiTaiKhoan.Controls.Add(taoTaiKhoan);
            taoTaiKhoan.Show();
        }

        private void btnSuaTaiKhoan_Click(object sender, EventArgs e)
        {
            this.panelQuanLiTaiKhoan.Controls.Clear();
            TaiKhoan_DoiMK suaTaiKhoan = new TaiKhoan_DoiMK(tentaikhoan);
            suaTaiKhoan.TopLevel = false;
            suaTaiKhoan.FormBorderStyle = FormBorderStyle.None;
            this.panelQuanLiTaiKhoan.Controls.Add(suaTaiKhoan);
            suaTaiKhoan.Show();
        }

        private void btnXoaTaiKhoan_Click(object sender, EventArgs e)
        {
            this.panelQuanLiTaiKhoan.Controls.Clear();
            TaiKhoan_Xoa xoaTaiKhoan =  new TaiKhoan_Xoa();
            xoaTaiKhoan.TopLevel = false;
            xoaTaiKhoan.FormBorderStyle = FormBorderStyle.None;
            this.panelQuanLiTaiKhoan.Controls.Add(xoaTaiKhoan);
            xoaTaiKhoan.Show();
        }
    }
}
